
public class SchavaBoolean extends Atom {
	
	public SchavaBoolean(boolean data) {
		super(new Boolean(data));
	}
	
	public boolean isTrue() {
		return ((Boolean)getValue()).booleanValue();
	}
	
	public SchavaBoolean negate() {
		if (isTrue()) {
			return Evaluator.SCHAVA_FALSE;
		} else {
			return Evaluator.SCHAVA_TRUE;
		}
	}
	
	public boolean isBoolean() {
		return true;
	}
	
	public String toString() {
		if (isTrue()) {
			return "#t";
		} else {
			return "#f";
		}
	}
	
	public SchavaBoolean and(SchavaBoolean other) {
		if (isTrue() && other.isTrue()) {
			return Evaluator.SCHAVA_TRUE;
		} else {
			return Evaluator.SCHAVA_FALSE;
		}
	}
	

}
